﻿using System;

namespace LocalOverride.Fiddler.UrlMapping
{
    public interface IMappingRegistry
    {
        MappingResult GetMapping(Uri requestUri);
    }

    public class MappingResult
    {
        public static MappingResult NoMapping = new MappingResult();

        public bool DownloadMissingFile { get; set; }
        public string LocalFile { get; private set; }
        public bool HasMatch { get; private set; }

        public MappingResult() { }

        public MappingResult(string localFile, bool downloadMissingFile)
        {
            HasMatch = true;
            DownloadMissingFile = downloadMissingFile;
            LocalFile = localFile;
        }
    }
}